<?php

use Illuminate\Support\Facades\Schema;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Database\Migrations\Migration;

class AddTableRepayRecordXzFailureMessageField extends Migration
{
    /**
     * Run the migrations.
     *
     * @return void
     */
    public function up()
    {
        //
        Schema::table('repay_records', function (Blueprint $table) {
            $table->text('xz_failure_message')->nullable()->comment('销帐错误信息');
        });
    }

    /**
     * Reverse the migrations.
     *
     * @return void
     */
    public function down()
    {
        //
        if(Schema::hasTable('repay_records')){
            Schema::table('repay_records', function (Blueprint $table) {
                $table->dropColumn('xz_failure_message');

            });
        }

    }
}
